package com.hjx.service;

import com.hjx.dao.Impl.orderImpl;
import com.hjx.dao.jojjle.orderDao;
import com.hjx.pojo.Order;

import java.util.List;

public class orderService {
    private orderDao dao;
    public orderService(){

    }
    //查询订单所有信息
    public List<Order> getAllOrder() throws Exception {
        this.dao=new orderImpl();
        List<Order> orderList=dao.getAlltOrder();
        return orderList;
    }
    public List<Order> getOrder(Object[] args)throws Exception{
        this.dao=new orderImpl();
        List<Order> orderList=this.dao.getOrder(args);
        return orderList;
    }
    public int updateOrder(String[] args)throws Exception{
        this.dao=new orderImpl();
        int count=this.dao.updateOrder(args);
        return count;
    }
    public int delOrder(Object[] args)throws Exception{
        this.dao=new orderImpl();
        int count=this.dao.delOrder(args);
        return count;
    }
    public int insertOrder(String[] args)throws Exception{
        this.dao=new orderImpl();
        int count=this.dao.addOrder(args);
        return count;
    }
}
